$(function () {
    var currentUrl = window.location.href+'';
    var list = $("nav.menu>a");
    $.each(list,function (index,e) {
        var _href = e.href+'';
        if(_href!='#' && _href!='' && $.trim(_href)!='#' && $.trim(_href)!='' && _href.indexOf(currentUrl)!=-1){
            $(e).addClass("active");
        }
    });
});